
import turtle

def press_a():
    print('你当前按下的按键是a')
def press_w():
    print('你当前按下的按键是w')

# 键盘按下绑定
turtle.onkeypress(press_a, 'a')
turtle.onkeypress(press_w, 'w')
# 键盘监听
turtle.listen()

def click(x,y):
    turtle.goto(x,y)

# 1 鼠标左键2 鼠标中间滚轮 3 鼠标右键
turtle.onscreenclick(click, 1)
turtle.done()
